home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / asmutil / asm_n_z.zip / SDDOS.MAC < prev    next >
Text File  |  1988-01-29  |  6KB  |  113 lines

  1. ;------------------------------------------------------------------------------;
  2. ;                                                                              ;
  3. ; Switch Directory - DOS   Copyright (c) Stephen M. Falatko, 1987, 1988        ;
  4. ;                                                                              ;
  5. ;     Switch  Directory  -  DOS  (SD)  is  a utility that allows easy          ;
  6. ;     switching between subdirectories and  drives with  a minimum of          ;
  7. ;     typing.   SD has  been designed  to replace  the DOS CD command          ;
  8. ;     while providing enhancements to the CD command.   SD allows you          ;
  9. ;     to  specify  a  specific  subdirectory  name,  a combination of          ;
  10. ;     subdirectory names  and  search  switches  or  a  complete path          ;
  11. ;     specifier.   All features  of SD work  across disk  drives.  If          ;
  12. ;     you have made a mistake, hitting Ctrl-Brk while SD is searching          ;
  13. ;     will   break you out of SD and put you back in the subdirectory          ;
  14. ;     you started in.                                                          ;
  15. ;                                                                              ;
  16. ;     Switch Directory - DOS 1.0 is descended from SD version 3.4 and          ;
  17. ;     its predecessors.   The  improvement in SD is that SD - DOS can          ;
  18. ;     attach  itself  to  DOS  and  provide  the  same  functionality          ;
  19. ;     previously only  available with  SD in combination with PCED or          ;
  20. ;     CED.  For users of PCED or CED, an enhanced  version of  SD 3.4          ;
  21. ;     is available called Switch Directory - CED.                              ;
  22. ;     on your disk drives.                                                     ;
  23. ;                                                                              ;
  24. ;                                                                              ;
  25. ;     Usage:    [d:\....]>SD [drive][command specification]                    ;
  26. ;                                                                              ;
  27. ;      Commands:                                                               ;
  28. ;                                                                              ;
  29. ;      During startup -                                                        ;
  30. ;                 with +   no help                                             ;
  31. ;                 with -   no internal stack                                   ;
  32. ;                 can also put configuration file on command line              ;
  33. ;                                                                              ;
  34. ;      During normal use -                                                     ;
  35. ;                 \ - switch to specific path                                  ;
  36. ;                 / - search below subdirectory                                ;
  37. ;                     these switches can be mixed                              ;
  38. ;                     ie. sd \turbo/source\myprog would be legal               ;
  39. ;                 @  - switch to last path selected with "#                    ;
  40. ;                 @" - kill SD and release memory                              ;
  41. ;                 "+ or -   - go to next highest or lowest path                ;
  42. ;                 "#=[path] - store [path] in stack location #                 ;
  43. ;                 "#=@      - insert current path into stack location #        ;
  44. ;                 "# - switch to entry number #                                ;
  45. ;                 "s - display stack                                           ;
  46. ;                                                                              ;
  47. ;                                                                              ;
  48. ;The source code was originally developed from Vern Buerg's LDIR program and   ;
  49. ;Charles Wooster's WHISK program.  PrintS and GetDir are Copyrighted by their  ;
  50. ;authors.                                                                      ;
  51. ;                                                                              ;
  52. ; 1/29/88 - Stephen Falatko                                                    ;
  53. ;                                                                              ;
  54. ;Written for the A86 assembler (All numbers with leading 0 are hex)            ;
  55. ;                                                                              ;
  56. ;    To Assemble:   [d:]>A86 SDDOS.MAC SDDOS.ASM SDDOS.INS                     ;
  57. ;                                                                              ;
  58. ;                                                                              ;
  59. ;------------------------------------------------------------------------------;
  60.  
  61.  
  62. ;---------------------------------------------------------------------------;
  63. ;                                                                           ;
  64. ;     Macros and Equates                                                    ;
  65. ;                                                                           ;
  66. ;---------------------------------------------------------------------------;
  67.  
  68.  
  69. LF           Equ     10
  70. CR           Equ     13
  71. Stopper      Equ     255                    ;Ends print strings
  72.  
  73. ;
  74. ;  These equates are for DOS functions.  They are all in hex.  A86 defaults
  75. ;  to hex if the number has a leading 0.
  76. ;
  77.  
  78. SetDrive     Equ     0E
  79. CurrentDisk  Equ     019                     ;Get current disk
  80. SetDTA       Equ     01A                     ;Set data transfer area
  81. ChangeDir    Equ     03B                     ;Change directory
  82. GetPath      Equ     047                     ;Get current directory
  83.  
  84.  
  85. Change_Dir MACRO
  86.  
  87.         Mov DX,Offset #1
  88.         Mov AH,ChangeDir
  89.         PUSHF
  90.         CALL    Old_INT_21
  91. #EM
  92.  
  93. Set_Drive MACRO
  94.  
  95.         Mov AH,SetDrive
  96.         PUSHF
  97.         CALL    Old_INT_21
  98. #EM
  99.  
  100. Get_Path MACRO
  101.  
  102.         Mov AH,GetPath
  103.         PUSHF
  104.         CALL    Old_INT_21
  105. #EM
  106.  
  107. Current_Disk MACRO
  108.  
  109.         Mov AH,CurrentDisk
  110.         PUSHF
  111.         CALL    Old_INT_21
  112. #EM
  113.